package com.lujieni.proxy.cloud.fallback;

import com.lujieni.proxy.cloud.CloudFeign;
import com.lujieni.proxy.cloud.po.StudentPO;
import com.lujieni.shared.dto.StudentDTO;
import com.lujieni.shared.dto.UserDTO;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class ConsumerFallback implements CloudFeign {
    @Override
    public String sayHello() {
        return null;
    }

    @Override
    public List<StudentPO> sayBye() {
        List<StudentPO> list = new ArrayList<>();
        StudentPO studentPO = new StudentPO();
        studentPO.setName("我是降级方法哦");
        list.add(studentPO);
        return list;
    }

    @Override
    public boolean register(UserDTO userDTO) {
        return false;
    }

    @Override
    public void insertStudent(StudentDTO studentDTO) {

    }
}
